package com.wjv.example.spbt.es.model;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <p>Title: Product</p>
 *
 * @author wjv
 * @since 2022/1/26 15:14
 */
@Data
@Document(indexName = "product", shards = 3, replicas = 3)
public class Product {
    @Id
    private Integer id;

    @Field(type = FieldType.Keyword)
    private String title;

    @Field(type = FieldType.Float)
    private Double price;

    @Field(type = FieldType.Text)
    private String description;

}
